package com.study.zzedu.ui.courseintroduce;

import android.content.Context;

import com.study.zzedu.base.BasePresenter;
import com.study.zzedu.http.OnResultListener;

public class CourseIntroducePresenter extends BasePresenter<CourseIntroduceContract.IView> {

    private CourseIntroduceModel eModel;
    public CourseIntroducePresenter(){
        this.eModel = new CourseIntroduceModel();
    }

    public void getAllData(Context context,String userCode,String courseCode){
        eModel.getAllData(context,userCode,courseCode,new OnResultListener() {
            @Override
            public void onSuccess(String result) {
                getView().getAllData(result);
            }

            @Override
            public void onError(String error) {
                getView().showError(error);
            }
        });
    }

}
